(function ( exports ) {
    var constNamespace = {
        Error: {
            INVALID_ATTRIBUTE_TYPE: 'Invalid attribute type!',
            INCORRECT_ATTRIBUTES_COUNT: 'Incorrect attributes count!',
            REQUIRED_ATTRIBUTES_MISSED: 'Some of the required attributes missed',
            SCONTEXT_UNDEF_WRONGTYPE: 'Passed serialization context variable is undefined or not of COSA.SerializationContext type',
            RQPARAM_UNDEFINED: 'Required parameter {0} is undefined',
            RQPARAM_NULL: 'Required parameter {0} is null',
            RQPARAM_NOTINSTANCE: 'Required parameter {0} is not an instance of required type',
            SC_UNDEFINED: '{0}: Serialization Context, passed as a parameter, is \'undefined\'',
            SC_NOLETTER: '{0}: There is no any letter registered in serialization context for provided namespace ({1})',
            SC_ALREADYRESERVED: 'Serialization Context: Letter \'{0}\' already reserved. Override denied!',
            SC_NSALREADYREGISTERED: 'Serialization Context: You try to register already registered namespace. Denied!',
            CS_PASSEDVALUENOTOBJ: 'Serialization Context: Can\'t extract namespace defs. Passed value is not an object.',
            ENC_CANTENCODEGUID: 'Encoder: Can\'t encode GUID: {0}',
            VLD_NOTGUID: 'Validation: \'{0}\' has invalid format for GUID value;',
            ENODE_CANTFINDNODE: 'Deserialization: can\'t find node \'{0}\''
        },
        Message: {
            Retrieve: 'Retrieve',
            RetrieveMultiple: 'RetrieveMultiple',
            Create: 'Create',
            Update: 'Update',
            Delete: 'Delete',
            ExecuteMultiple: 'ExecuteMultiple',
            RetrieveAttribute: 'RetrieveAttribute',
            RetrieveEntity: 'RetrieveEntity',
            RetrieveAllEntities: 'RetrieveAllEntities',
            Associate: 'Associate',
            Disassociate: 'Disassociate',
            ExecuteWorkflow: 'ExecuteWorkflow',
            Assign: 'Assign',
            SetState: 'SetState',
            RetrieveUserPrivileges: 'RetrieveUserPrivileges',
            RetrievePrincipalAccess: 'RetrievePrincipalAccess',
            LoseOpportunity: 'LoseOpportunity',
            WinOpportunity: 'WinOpportunity',
            QualifyLead: 'QualifyLead',
            AddListMembersList: 'AddListMembersList',
            AddMemberList: 'AddMemberList',
            CopyMembersList: 'CopyMembersList',
            RemoveMemberList: 'RemoveMemberList',
            RetrieveMetadataChanges: 'RetrieveMetadataChanges'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        AttributeType: {
            String: 'string',
            WholeNumber: 'int',
            FloatingPointNumber: 'double',
            Decimal: 'decimal',
            DateTime: 'dateTime',
            TwoOption: 'boolean',
            Image: 'base64Binary',
            OptionSet: 'OptionSet',
            Bool: 'boolean',
            Currency: 'Money',
            EntityReference: 'EntityReference',
            ActivityParty: 'EntityCollection',
            EntityCollection: 'EntityCollection',
            Entity: 'BusinessEntity',
            GUID: 'guid',
            Number: 'number',
            EntityFilters: 'EntityFilters'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        FilterOperator: {
            AND: 'And',
            OR: 'Or'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        JoinOperator: {
            Inner: 'Inner',
            LeftOuter: 'LeftOuter',
            Natural: 'Natural'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        OrderType: {
            Asc: 'Ascending',
            Desc: 'Descending'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        ConditionOperator: {
            Like: 'Like',
            BeginsWith: 'BeginsWith',
            Between: 'Between',
            ChildOf: 'ChildOf',
            Contains: 'Contains',
            DoesNotBeginWith: 'DoesNotBeginWith',
            DoesNotContain: 'DoesNotContain',
            DoesNotEndWith: 'DoesNotEndWith',
            Equal: 'Equal',
            EqualBusinessId: 'EqualBusinessId',
            EqualUserId: 'EqualUserId',
            EqualUserLanguage: 'EqualUserLanguage',
            EqualUserOrUserTeams: 'EqualUserOrUserTeams',
            EqualUserTeams: 'EqualUserTeams',
            EndsWith: 'EndsWith',
            InOrAfterFiscalPeriodAndYear: 'InOrAfterFiscalPeriodAndYear',
            InOrBeforeFiscalPeriodAndYear: 'InOrBeforeFiscalPeriodAndYear',
            In: 'In',
            InFiscalPeriod: 'InFiscalPeriod',
            InFiscalPeriodAndYear: 'InFiscalPeriodAndYear',
            InFiscalYear: 'InFiscalYear',
            Last7Days: 'Last7Days',
            LastMonth: 'LastMonth',
            LastWeek: 'LastWeek',
            LastXDays: 'LastXDays',
            LastXFiscalPeriods: 'LastXFiscalPeriods',
            LastXFiscalYears: 'LastXFiscalYears',
            LastXHours: 'LastXHours',
            LastXMonths: 'LastXMonths',
            LastXWeeks: 'LastXWeeks',
            LastXYears: 'LastXYears',
            LastYear: 'LastYear',
            LessEqual: 'LessEqual',
            LessThan: 'LessThan',
            Mask: 'Mask',
            MasksSelect: 'MasksSelect',
            Next7Days: 'Next7Days',
            NextFiscalPeriod: 'NextFiscalPeriod',
            NextFiscalYear: 'NextFiscalYear',
            NextMonth: 'NextMonth',
            NextWeek: 'NextWeek',
            NextXDays: 'NextXDays',
            NextXFiscalPeriods: 'NextXFiscalPeriods',
            NextXFiscalYears: 'NextXFiscalYears',
            NextXHours: 'NextXHours',
            NextXMonths: 'NextXMonths',
            NextXWeeks: 'NextXWeeks',
            NextXYears: 'NextXYears',
            NextYear: 'NextYear',
            NotBetween: 'NotBetween',
            NotEqual: 'NotEqual',
            NotEqualBusinessId: 'NotEqualBusinessId',
            NotEqualUserId: 'NotEqualUserId',
            NotIn: 'NotIn',
            NotLike: 'NotLike',
            NotNull: 'NotNull',
            NotOn: 'NotOn',
            Null: 'Null',
            OlderThanXMonths: 'OlderThanXMonths',
            On: 'On',
            OnOrAfter: 'OnOrAfter',
            OnOrBefore: 'OnOrBefore',
            ThisFiscalPeriod: 'ThisFiscalPeriod',
            ThisFiscalYear: 'ThisFiscalYear',
            ThisMonth: 'ThisMonth',
            ThisWeek: 'ThisWeek',
            ThisYear: 'ThisYear',
            Today: 'Today',
            Tomorrow: 'Tomorrow',
            Yesterday: 'Yesterday',
            GreaterEqual: 'GreaterEqual',
            GreaterThan: 'GreaterThan'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        EntityFilters: {
            Entity: 'Entity',
            Attributes: 'Attributes',
            All: 'Entity Attributes Privileges Relationships',
            Default: 'Entity',
            Privileges: 'Privileges',
            Relationships: 'Relationships'
        },
        /**
         * @memberOf COSA.Const
         * @enum {number}
         */
        KeyValuePairType: {
            StringAnyType: 0,
            StringString: 1,
            StringAnyTypeWithoutPrefix: 2
        },
        /**
         * @memberOf COSA.Const
         * @enum {number}
         */
        EntityRole: {
            Referenced: 1,
            Referencing: 0
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        MetadataConditionOperator: {
            Equals: 'Equals',
            GreaterThan: 'GreaterThan',
            In: 'In',
            LessThan: 'LessThan',
            NotEquals: 'NotEquals',
            NotIn: 'NotIn'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        DeletedMetadataFilters: {
            All: 'All',
            Attribute: 'Attribute',
            Default: 'Default',
            Entity: 'Entity',
            Label: 'Label',
            OptionSet: 'OptionSet',
            Relationship: 'Relationship'
        },
        AttributeTypeCode: {
            Boolean:'Boolean',
            Customer:'Customer',
            DateTime:'DateTime',
            Decimal:'Decimal',
            Double:'Double',
            Integer:'Integer',
            Lookup:'Lookup',
            Memo:'Memo',
            Money:'Money',
            Owner:'Owner',
            PartyList:'PartyList',
            Picklist:'Picklist',
            State:'State',
            Status:'Status',
            String:'String',
            Uniqueidentifier:'Uniqueidentifier',
            CalendarRules:'CalendarRules',
            Virtual:'Virtual',
            BigIng:'BigInt',
            ManagedProperty:'ManagedProperty',
            EntityName:'EntityName'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        AttributeRequiredLevel: {
            ApplicationRequired:'ApplicationRequired',
            None:'None',
            Recommended:'Recommended',
            SystemRequired:'SystemRequired'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        DateTimeFormat: {
            DateAndTime: 'DateAndTime',
            DateOnly: 'DateOnly'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        ImeMode: {
            Active:'Active',
            Auto:'Auto',
            Disabled:'Disabled',
            Inactive:'Inactive'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        IntegerFormat: {
            Duration:'Duration',
            Language:'Language',
            Locale:'Locale',
            None:'None',
            TimeZone:'TimeZone'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        OwnershipType: {
            BusinessOwned:'BusinessOwned',
            BusinessParented:'BusinessParented',
            None:'None',
            OrganizationOwned:'OrganizationOwned',
            TeamOwned:'TeamOwned',
            UserOwned:'UserOwned'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        RelationshipType: {
            Default:'Default',
            ManyToManyRelationship:'ManyToManyRelationship',
            OneToManyRelationship:'OneToManyRelationship'
        },
        /**
         * @memberOf COSA.Const
         * @enum {string}
         */
        StringFormat: {
            Email:'Email',
            Phone:'Phone',
            PhoneticGuide:'PhoneticGuide',
            Text:'Text',
            TextArea:'TextArea',
            TickerSymbol:'TickerSymbol',
            Url:'Url',
            VersionNumber:'VersionNumber'
        }
    };

    for ( var d in constNamespace ) {
        if ( constNamespace.hasOwnProperty(d) ) {
            exports[d] = constNamespace[d];
        }
    }

})(COSA.Const);